window.addEventListener('load',function(){
    
    var left = document.querySelector('.left');
    var right = document.querySelector('.right');
    var p_left = document.querySelector('.p_left');
    var p_right = document.querySelector('.p_right');
    var btn_clear = document.querySelector('.clear')
    var left_num = 0;
    var right_num = 0;
    left.addEventListener('click',function(){
        left_num++
        p_left.innerHTML = '左键:'+left_num;
    })
    right.addEventListener('contextmenu',function(){
        right_num++
        p_right.innerHTML = '右键:'+right_num;
    })
    btn_clear.addEventListener('click',function(){
        right_num = 0;
        left_num = 0;
        p_left.innerHTML = '左键:'
        p_right.innerHTML = '右键:'
    })
    document.addEventListener('contextmenu',function(e){
        e.returnValue = false;
    })
})
